<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="box1">123</div>
    <script type="text/javascript">
        var div = document.getElementById("box1");
        div.onclick = function() {
            alert("我是弹出的内容");
        }
    </script>
</body>

</html>